.class public Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;
.super Ljava/lang/Object;
.source "Sprayer.java"

# interfaces
.implements Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface;


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Llt/noframe/gpsfarmguide/sprayer/spray/TrackSprayerInterface<",
        "Lcom/google/android/gms/maps/model/Polygon;",
        ">;"
    }
.end annotation


# static fields
.field private static MAX_POINTS_IN_POLY:I = 0x28

.field private static bearingTolerance:D = 1.0


# instance fields
.field private area:D

.field private bearing:D

.field private color:I

.field private color2:I

.field private counter:I

.field private cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

.field private currentArea:D

.field private drawPolygon:Z

.field private finalls:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;"
        }
    .end annotation
.end field

.field private lastbearing:D

.field private lefts:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;",
            ">;"
        }
    .end annotation
.end field

.field private mids:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/LatLng;",
            ">;"
        }
    .end annotation
.end field

.field private poly:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/Polygon;",
            ">;"
        }
    .end annotation
.end field

.field private pt1:Lcom/google/android/gms/maps/model/LatLng;

.field private pt2:Lcom/google/android/gms/maps/model/LatLng;

.field private rights:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;",
            ">;"
        }
    .end annotation
.end field

.field private sprayWidth:D

.field private tolerancePoints:I


# direct methods
.method public constructor <init>(D)V
    .locals 4

    .line 55
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const-wide/high16 v0, 0x4014000000000000L    # 5.0

    .line 33
    iput-wide v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->sprayWidth:D

    const v0, -0x4eff0100

    .line 40
    iput v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->color:I

    const v0, -0x4ef00100

    .line 41
    iput v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->color2:I

    const/4 v0, 0x1

    .line 53
    iput-boolean v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->drawPolygon:Z

    .line 56
    new-instance v0, Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-direct {v0}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    .line 57
    iget-wide v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->sprayWidth:D

    const-wide v2, 0x40091eb851eb851fL    # 3.14

    mul-double v0, v0, v2

    const-wide/high16 v2, 0x4000000000000000L    # 2.0

    div-double/2addr v0, v2

    double-to-int v0, v0

    iput v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->tolerancePoints:I

    const/4 v0, 0x0

    .line 58
    iput v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->counter:I

    const-wide/16 v0, 0x0

    .line 59
    iput-wide v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->area:D

    .line 60
    iput-wide v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->currentArea:D

    div-double/2addr p1, v2

    .line 61
    iput-wide p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->sprayWidth:D

    return-void
.end method

.method private calculateCurrentPolygonArea()D
    .locals 2

    .line 460
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->poly:Ljava/util/List;

    if-eqz v0, :cond_0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_0

    .line 461
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->poly:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/google/android/gms/maps/model/Polygon;

    invoke-virtual {v0}, Lcom/google/android/gms/maps/model/Polygon;->getPoints()Ljava/util/List;

    move-result-object v0

    invoke-static {v0}, Llt/noframe/gpsfarmguide/utils/Mathematics;->calculateArea(Ljava/util/List;)D

    move-result-wide v0

    goto :goto_0

    .line 462
    :cond_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->finalls:Ljava/util/List;

    if-eqz v0, :cond_1

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_1

    .line 463
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->finalls:Ljava/util/List;

    invoke-static {v0}, Llt/noframe/gpsfarmguide/utils/Mathematics;->calculateArea(Ljava/util/List;)D

    move-result-wide v0

    goto :goto_0

    :cond_1
    const-wide/16 v0, 0x0

    :goto_0
    return-wide v0
.end method

.method private findIntersectionIndx(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Ljava/util/List;I)Z
    .locals 3
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/google/android/gms/maps/model/LatLng;",
            "Lcom/google/android/gms/maps/model/LatLng;",
            "Ljava/util/List<",
            "Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;",
            ">;I)Z"
        }
    .end annotation

    const/4 v0, 0x0

    if-eqz p3, :cond_0

    .line 257
    invoke-interface {p3}, Ljava/util/List;->size()I

    move-result v1

    if-lt v1, p4, :cond_0

    const/4 v1, 0x2

    .line 258
    new-array v2, v1, [Lcom/google/android/gms/maps/model/LatLng;

    aput-object p1, v2, v0

    const/4 p1, 0x1

    aput-object p2, v2, p1

    .line 259
    new-array p2, v1, [Lcom/google/android/gms/maps/model/LatLng;

    invoke-interface {p3}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, p4

    invoke-interface {p3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    aput-object v1, p2, v0

    invoke-interface {p3}, Ljava/util/List;->size()I

    move-result v0

    sub-int/2addr v0, p4

    invoke-interface {p3, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object p3

    check-cast p3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {p3}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getMid()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object p3

    aput-object p3, p2, p1

    .line 260
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {p1, v2, p2}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->isLinesIntersect([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result p1

    return p1

    :cond_0
    return v0
.end method

.method private formLine(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)[Lcom/google/android/gms/maps/model/LatLng;
    .locals 2

    const/4 v0, 0x2

    .line 475
    new-array v0, v0, [Lcom/google/android/gms/maps/model/LatLng;

    const/4 v1, 0x0

    aput-object p1, v0, v1

    const/4 p1, 0x1

    aput-object p2, v0, p1

    return-object v0
.end method

.method private getDifference(DD)D
    .locals 7

    sub-double v0, p1, p3

    const-wide v2, 0x4076800000000000L    # 360.0

    const-wide/16 v4, 0x0

    cmpg-double v6, v0, v4

    if-gez v6, :cond_0

    add-double/2addr v0, v2

    :cond_0
    sub-double/2addr p3, p1

    cmpg-double p1, p3, v4

    if-gez p1, :cond_1

    add-double/2addr p3, v2

    .line 394
    :cond_1
    invoke-static {v0, v1, p3, p4}, Ljava/lang/Math;->min(DD)D

    move-result-wide p1

    return-wide p1
.end method

.method private getPointOfIntersectionToLastBearing(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)I
    .locals 8

    .line 406
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->pt2:Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {p0, p1, v0}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->formLine(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)[Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v0

    .line 407
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->pt1:Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {p0, p2, v1}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->formLine(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)[Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    .line 423
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v3

    if-ge v2, v3, :cond_0

    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    goto :goto_0

    :cond_0
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    :goto_0
    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    const/4 v3, 0x1

    sub-int/2addr v2, v3

    :goto_1
    const/4 v4, 0x0

    if-lez v2, :cond_3

    .line 427
    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v5

    if-ge v2, v5, :cond_1

    .line 429
    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v5, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v5}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    iget-object v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    add-int/lit8 v7, v2, -0x1

    invoke-interface {v6, v7}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v6}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v6

    invoke-direct {p0, v5, v6}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->formLine(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)[Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    .line 430
    iget-object v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v6, v1, v5}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linesIntersectionPoint([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    if-eqz v5, :cond_1

    .line 432
    iget-object p2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    new-instance v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, v3

    invoke-interface {p2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getMid()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    invoke-direct {v0, v5, v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {p2, v2, v0}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 433
    iget-object p2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    add-int/2addr v2, v3

    invoke-interface {p2, v4, v2}, Ljava/util/List;->subList(II)Ljava/util/List;

    move-result-object p2

    iput-object p2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    .line 434
    iget-object p2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    new-instance v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-interface {p2}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, v3

    invoke-interface {p2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getMid()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    invoke-direct {v0, p1, v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {p2, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    const/4 v3, 0x2

    goto :goto_2

    .line 440
    :cond_1
    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v5

    if-ge v2, v5, :cond_2

    .line 441
    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v5, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v5}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    iget-object v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    add-int/lit8 v7, v2, -0x1

    invoke-interface {v6, v7}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v6}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v6

    invoke-direct {p0, v5, v6}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->formLine(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)[Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    .line 442
    iget-object v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v6, v0, v5}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linesIntersectionPoint([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    if-eqz v5, :cond_2

    .line 444
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    new-instance v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, v3

    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getMid()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    invoke-direct {v0, v5, v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {p1, v2, v0}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 445
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    add-int/2addr v2, v3

    invoke-interface {p1, v4, v2}, Ljava/util/List;->subList(II)Ljava/util/List;

    move-result-object p1

    iput-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    .line 446
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    new-instance v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, v3

    invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getMid()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    invoke-direct {v0, p2, v1}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    goto :goto_2

    :cond_2
    add-int/lit8 v2, v2, -0x1

    goto/16 :goto_1

    :cond_3
    const/4 v3, 0x0

    :goto_2
    return v3
.end method

.method private ifAfterStart(Lcom/google/android/gms/maps/model/LatLng;)V
    .locals 13

    .line 220
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    .line 221
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    .line 223
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/google/android/gms/maps/model/LatLng;

    .line 225
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v1, v0, p1}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->lineSegmentBearing(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)D

    move-result-wide v10

    .line 227
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-wide v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->sprayWidth:D

    const-wide v7, 0x4056800000000000L    # 90.0

    move-object v2, v0

    move-wide v3, v10

    invoke-virtual/range {v1 .. v8}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v12

    .line 228
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-wide v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->sprayWidth:D

    const-wide v7, -0x3fa9800000000000L    # -90.0

    invoke-virtual/range {v1 .. v8}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v0

    .line 230
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-wide v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->sprayWidth:D

    const-wide v8, 0x4056800000000000L    # 90.0

    move-object v3, p1

    move-wide v4, v10

    invoke-virtual/range {v2 .. v9}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v1

    .line 231
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-wide v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->sprayWidth:D

    const-wide v8, -0x3fa9800000000000L    # -90.0

    invoke-virtual/range {v2 .. v9}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v2

    .line 234
    invoke-direct {p0, v2, v1, v12, v0}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->setSprayPolygonOptions(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    .line 236
    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    new-instance v4, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v6

    add-int/lit8 v6, v6, -0x1

    invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v4, v12, v5}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v3, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 237
    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    new-instance v4, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v6

    add-int/lit8 v6, v6, -0x1

    invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v4, v0, v5}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v3, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 238
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    new-instance v3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v4, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v5

    add-int/lit8 v5, v5, -0x1

    invoke-interface {v4, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v3, v1, v4}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v0, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 239
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    new-instance v1, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v4

    add-int/lit8 v4, v4, -0x1

    invoke-interface {v3, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v1, v2, v3}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v0, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 241
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 242
    iput-wide v10, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lastbearing:D

    return-void
.end method

.method private ifStart(Lcom/google/android/gms/maps/model/LatLng;)V
    .locals 1

    .line 207
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    .line 208
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    invoke-interface {v0, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 210
    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->poly:Ljava/util/List;

    if-nez p1, :cond_0

    .line 211
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->poly:Ljava/util/List;

    .line 213
    :cond_0
    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    iput-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->finalls:Ljava/util/List;

    return-void
.end method

.method private isFinalSelfIntersectsOrhaveTooMuchPoints()Z
    .locals 10

    .line 291
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    const/4 v1, 0x0

    if-eqz v0, :cond_7

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    const/4 v2, 0x2

    if-lt v0, v2, :cond_7

    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    if-eqz v0, :cond_7

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-ge v0, v2, :cond_0

    goto/16 :goto_1

    .line 297
    :cond_0
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->finalls:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    sget v3, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->MAX_POINTS_IN_POLY:I

    const/4 v4, 0x1

    if-le v0, v3, :cond_1

    return v4

    .line 301
    :cond_1
    new-array v0, v2, [Lcom/google/android/gms/maps/model/LatLng;

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v5

    sub-int/2addr v5, v2

    invoke-interface {v3, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v3

    aput-object v3, v0, v1

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v5

    sub-int/2addr v5, v4

    invoke-interface {v3, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v3

    aput-object v3, v0, v4

    .line 302
    new-array v3, v2, [Lcom/google/android/gms/maps/model/LatLng;

    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v6

    sub-int/2addr v6, v2

    invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v5}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    aput-object v5, v3, v1

    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v6

    sub-int/2addr v6, v4

    invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v5}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v5

    aput-object v5, v3, v4

    .line 303
    new-array v5, v2, [Lcom/google/android/gms/maps/model/LatLng;

    iget-object v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v6}, Ljava/util/List;->size()I

    move-result v7

    sub-int/2addr v7, v4

    invoke-interface {v6, v7}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v6}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v6

    aput-object v6, v5, v1

    iget-object v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v6}, Ljava/util/List;->size()I

    move-result v7

    sub-int/2addr v7, v4

    invoke-interface {v6, v7}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v6}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v6

    aput-object v6, v5, v4

    .line 304
    new-array v6, v2, [Lcom/google/android/gms/maps/model/LatLng;

    iget-object v7, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v7}, Ljava/util/List;->size()I

    move-result v8

    sub-int/2addr v8, v2

    invoke-interface {v7, v8}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v7}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v7

    aput-object v7, v6, v1

    iget-object v7, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v7}, Ljava/util/List;->size()I

    move-result v8

    sub-int/2addr v8, v2

    invoke-interface {v7, v8}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v7}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v7

    aput-object v7, v6, v4

    .line 308
    iget-object v7, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v7, v5, v6}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->isLinesIntersect([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v6

    if-eqz v6, :cond_2

    .line 310
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, v2

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    .line 311
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v3

    sub-int/2addr v3, v2

    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v5

    sub-int/2addr v5, v4

    invoke-interface {v2, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    invoke-interface {v1, v3, v2}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 312
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v2

    sub-int/2addr v2, v4

    invoke-interface {v1, v2, v0}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 313
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->recalculateFinnal()V

    return v4

    .line 317
    :cond_2
    iget-object v6, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v6, v0, v3}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->isLinesIntersect([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v6

    if-eqz v6, :cond_3

    .line 319
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    sub-int/2addr v1, v2

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    .line 320
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v3

    sub-int/2addr v3, v2

    iget-object v5, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v6

    sub-int/2addr v6, v2

    invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    invoke-interface {v1, v3, v5}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 321
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v3

    sub-int/2addr v3, v2

    invoke-interface {v1, v3, v0}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 322
    invoke-direct {p0}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->recalculateFinnal()V

    return v4

    :cond_3
    const/4 v6, 0x1

    .line 328
    :goto_0
    iget-object v7, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->finalls:Ljava/util/List;

    invoke-interface {v7}, Ljava/util/List;->size()I

    move-result v7

    if-ge v6, v7, :cond_7

    .line 330
    new-array v7, v2, [Lcom/google/android/gms/maps/model/LatLng;

    iget-object v8, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->finalls:Ljava/util/List;

    add-int/lit8 v9, v6, -0x1

    invoke-interface {v8, v9}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Lcom/google/android/gms/maps/model/LatLng;

    aput-object v8, v7, v1

    iget-object v8, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->finalls:Ljava/util/List;

    invoke-interface {v8, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Lcom/google/android/gms/maps/model/LatLng;

    aput-object v8, v7, v4

    .line 333
    iget-object v8, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v8, v0, v7}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->isLinesIntersect([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v8

    if-eqz v8, :cond_4

    invoke-direct {p0, v0, v7}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->isLinesHaveSamePoints([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v8

    if-nez v8, :cond_4

    return v4

    .line 335
    :cond_4
    iget-object v8, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v8, v3, v7}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->isLinesIntersect([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v8

    if-eqz v8, :cond_5

    invoke-direct {p0, v3, v7}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->isLinesHaveSamePoints([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v8

    if-nez v8, :cond_5

    return v4

    .line 337
    :cond_5
    iget-object v8, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    invoke-virtual {v8, v5, v7}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->isLinesIntersect([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v8

    if-eqz v8, :cond_6

    invoke-direct {p0, v5, v7}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->isLinesHaveSamePoints([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z

    move-result v7

    if-nez v7, :cond_6

    return v4

    :cond_6
    add-int/lit8 v6, v6, 0x1

    goto :goto_0

    :cond_7
    :goto_1
    return v1
.end method

.method private isLinesHaveSamePoints([Lcom/google/android/gms/maps/model/LatLng;[Lcom/google/android/gms/maps/model/LatLng;)Z
    .locals 4

    const/4 v0, 0x0

    .line 346
    aget-object v1, p1, v0

    aget-object v2, p2, v0

    const/4 v3, 0x1

    if-eq v1, v2, :cond_1

    aget-object v1, p1, v3

    aget-object v2, p2, v0

    if-eq v1, v2, :cond_1

    aget-object v1, p1, v3

    aget-object v2, p2, v3

    if-eq v1, v2, :cond_1

    aget-object p1, p1, v0

    aget-object p2, p2, v3

    if-ne p1, p2, :cond_0

    goto :goto_0

    :cond_0
    return v0

    :cond_1
    :goto_0
    return v3
.end method

.method private recalculateFinnal()V
    .locals 4

    .line 271
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->finalls:Ljava/util/List;

    const/4 v0, 0x0

    const/4 v1, 0x0

    .line 272
    :goto_0
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-ge v1, v2, :cond_0

    .line 273
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->finalls:Ljava/util/List;

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v3

    invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    add-int/lit8 v1, v1, 0x1

    goto :goto_0

    .line 275
    :cond_0
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    :goto_1
    if-ltz v1, :cond_1

    .line 276
    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->finalls:Ljava/util/List;

    iget-object v3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v3, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v3

    invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    add-int/lit8 v1, v1, -0x1

    goto :goto_1

    .line 278
    :cond_1
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->finalls:Ljava/util/List;

    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v2}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v2

    invoke-interface {v1, v2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 279
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->finalls:Ljava/util/List;

    iget-object v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v0

    invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    return-void
.end method

.method private redrawPolygon()V
    .locals 3

    .line 360
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->poly:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    add-int/lit8 v1, v1, -0x1

    invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/google/android/gms/maps/model/Polygon;

    .line 361
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->finalls:Ljava/util/List;

    invoke-virtual {v0, v1}, Lcom/google/android/gms/maps/model/Polygon;->setPoints(Ljava/util/List;)V

    .line 362
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->poly:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v2

    add-int/lit8 v2, v2, -0x1

    invoke-interface {v1, v2, v0}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    return-void
.end method

.method private setSprayPolygonOptions(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V
    .locals 3

    .line 375
    invoke-static {}, Llt/noframe/gpsfarmguide/AppPermissions;->isTesting()Z

    move-result v0

    if-eqz v0, :cond_0

    const/high16 v0, -0x10000

    goto :goto_0

    :cond_0
    const/4 v0, 0x0

    .line 377
    :goto_0
    new-instance v1, Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-direct {v1}, Lcom/google/android/gms/maps/model/PolygonOptions;-><init>()V

    iget v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->color:I

    .line 378
    invoke-virtual {v1, v2}, Lcom/google/android/gms/maps/model/PolygonOptions;->fillColor(I)Lcom/google/android/gms/maps/model/PolygonOptions;

    .line 379
    invoke-virtual {v1, v0}, Lcom/google/android/gms/maps/model/PolygonOptions;->strokeColor(I)Lcom/google/android/gms/maps/model/PolygonOptions;

    const/high16 v0, 0x40000000    # 2.0f

    .line 380
    invoke-virtual {v1, v0}, Lcom/google/android/gms/maps/model/PolygonOptions;->strokeWidth(F)Lcom/google/android/gms/maps/model/PolygonOptions;

    const/4 v0, 0x1

    .line 381
    invoke-virtual {v1, v0}, Lcom/google/android/gms/maps/model/PolygonOptions;->geodesic(Z)Lcom/google/android/gms/maps/model/PolygonOptions;

    if-eqz p3, :cond_1

    if-eqz p4, :cond_1

    .line 384
    invoke-virtual {v1, p4}, Lcom/google/android/gms/maps/model/PolygonOptions;->add(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-virtual {v1, p1}, Lcom/google/android/gms/maps/model/PolygonOptions;->add(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-virtual {v1, p2}, Lcom/google/android/gms/maps/model/PolygonOptions;->add(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-virtual {v1, p3}, Lcom/google/android/gms/maps/model/PolygonOptions;->add(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/PolygonOptions;

    goto :goto_1

    .line 386
    :cond_1
    invoke-virtual {v1, p1}, Lcom/google/android/gms/maps/model/PolygonOptions;->add(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/PolygonOptions;

    invoke-virtual {v1, p2}, Lcom/google/android/gms/maps/model/PolygonOptions;->add(Lcom/google/android/gms/maps/model/LatLng;)Lcom/google/android/gms/maps/model/PolygonOptions;

    .line 388
    :goto_1
    iget-boolean p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->drawPolygon:Z

    if-eqz p1, :cond_2

    iget-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->poly:Ljava/util/List;

    invoke-static {}, Llt/noframe/gpsfarmguide/Data;->getInstance()Llt/noframe/gpsfarmguide/Data;

    move-result-object p2

    invoke-virtual {p2}, Llt/noframe/gpsfarmguide/Data;->getMap()Lcom/google/android/gms/maps/GoogleMap;

    move-result-object p2

    invoke-virtual {p2, v1}, Lcom/google/android/gms/maps/GoogleMap;->addPolygon(Lcom/google/android/gms/maps/model/PolygonOptions;)Lcom/google/android/gms/maps/model/Polygon;

    move-result-object p2

    invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 389
    :cond_2
    iget-wide p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->area:D

    iget-wide p3, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->currentArea:D

    add-double/2addr p1, p3

    iput-wide p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->area:D

    return-void
.end method


# virtual methods
.method public deleteSprayed()V
    .locals 2

    .line 76
    iget-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->poly:Ljava/util/List;

    if-eqz v0, :cond_0

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    if-lez v0, :cond_0

    const/4 v0, 0x0

    .line 77
    :goto_0
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->poly:Ljava/util/List;

    invoke-interface {v1}, Ljava/util/List;->size()I

    move-result v1

    if-ge v0, v1, :cond_0

    .line 79
    iget-object v1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->poly:Ljava/util/List;

    invoke-interface {v1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/google/android/gms/maps/model/Polygon;

    invoke-virtual {v1}, Lcom/google/android/gms/maps/model/Polygon;->remove()V

    add-int/lit8 v0, v0, 0x1

    goto :goto_0

    :cond_0
    return-void
.end method

.method public getArea()D
    .locals 4

    .line 470
    iget-wide v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->area:D

    iget-wide v2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->currentArea:D

    add-double/2addr v0, v2

    return-wide v0
.end method

.method public onCameraMove()V
    .locals 0

    return-void
.end method

.method public pauseSpraying()V
    .locals 1

    .line 199
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    .line 200
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->finalls:Ljava/util/List;

    return-void
.end method

.method public reset()V
    .locals 2

    .line 68
    invoke-virtual {p0}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->deleteSprayed()V

    const/4 v0, 0x0

    .line 69
    iput v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->counter:I

    const-wide/16 v0, 0x0

    .line 70
    iput-wide v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->area:D

    .line 71
    iput-wide v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->currentArea:D

    return-void
.end method

.method public setIsDraw(Z)V
    .locals 0

    .line 496
    iput-boolean p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->drawPolygon:Z

    return-void
.end method

.method public setPolys(Ljava/util/List;D)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List<",
            "Lcom/google/android/gms/maps/model/Polygon;",
            ">;D)V"
        }
    .end annotation

    .line 480
    iget-boolean v0, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->drawPolygon:Z

    if-eqz v0, :cond_0

    .line 481
    iput-object p1, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->poly:Ljava/util/List;

    goto :goto_1

    .line 483
    :cond_0
    invoke-interface {p1}, Ljava/util/List;->iterator()Ljava/util/Iterator;

    move-result-object p1

    :goto_0
    invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z

    move-result v0

    if-eqz v0, :cond_1

    invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/google/android/gms/maps/model/Polygon;

    .line 484
    invoke-virtual {v0}, Lcom/google/android/gms/maps/model/Polygon;->remove()V

    goto :goto_0

    .line 487
    :cond_1
    :goto_1
    iput-wide p2, p0, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->area:D

    return-void
.end method

.method public sprayPoint(Lcom/google/android/gms/maps/model/LatLng;)V
    .locals 22

    move-object/from16 v1, p0

    move-object/from16 v0, p1

    .line 96
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    if-eqz v2, :cond_11

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    const/4 v10, 0x1

    if-ge v2, v10, :cond_0

    goto/16 :goto_9

    .line 103
    :cond_0
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    const/4 v11, 0x2

    if-ge v2, v11, :cond_1

    .line 105
    invoke-direct/range {p0 .. p1}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->ifAfterStart(Lcom/google/android/gms/maps/model/LatLng;)V

    return-void

    .line 110
    :cond_1
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-object v3, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v4

    sub-int/2addr v4, v10

    invoke-interface {v3, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Lcom/google/android/gms/maps/model/LatLng;

    invoke-virtual {v2, v3, v0}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->lineSegmentBearing(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)D

    move-result-wide v2

    iput-wide v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->bearing:D

    .line 114
    iget-wide v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->bearing:D

    iget-wide v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lastbearing:D

    invoke-direct {v1, v2, v3, v4, v5}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->getDifference(DD)D

    move-result-wide v2

    invoke-static {v2, v3}, Ljava/lang/Math;->abs(D)D

    move-result-wide v2

    sget-wide v4, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->bearingTolerance:D

    const/4 v12, 0x0

    cmpg-double v6, v2, v4

    if-gez v6, :cond_2

    const/4 v13, 0x1

    goto :goto_0

    :cond_2
    const/4 v13, 0x0

    .line 118
    :goto_0
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-wide v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->bearing:D

    iget-wide v6, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->sprayWidth:D

    const-wide v8, 0x4056800000000000L    # 90.0

    move-object/from16 v3, p1

    invoke-virtual/range {v2 .. v9}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v2

    iput-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->pt1:Lcom/google/android/gms/maps/model/LatLng;

    .line 119
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-wide v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->bearing:D

    iget-wide v6, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->sprayWidth:D

    const-wide v8, -0x3fa9800000000000L    # -90.0

    invoke-virtual/range {v2 .. v9}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v2

    iput-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->pt2:Lcom/google/android/gms/maps/model/LatLng;

    if-eqz v13, :cond_3

    .line 123
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-le v2, v10, :cond_3

    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v2

    if-le v2, v10, :cond_3

    .line 125
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v3

    sub-int/2addr v3, v10

    new-instance v4, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v5, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->pt1:Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v4, v5, v0}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v2, v3, v4}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    .line 126
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v3

    sub-int/2addr v3, v10

    new-instance v4, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v5, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->pt2:Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v4, v5, v0}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v2, v3, v4}, Ljava/util/List;->set(ILjava/lang/Object;)Ljava/lang/Object;

    goto :goto_1

    .line 130
    :cond_3
    iget-object v14, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    invoke-interface {v2}, Ljava/util/List;->size()I

    move-result v3

    sub-int/2addr v3, v10

    invoke-interface {v2, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v2

    move-object v15, v2

    check-cast v15, Lcom/google/android/gms/maps/model/LatLng;

    iget-wide v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->bearing:D

    iget-wide v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->sprayWidth:D

    const-wide v20, 0x4056800000000000L    # 90.0

    move-wide/from16 v16, v2

    move-wide/from16 v18, v4

    invoke-virtual/range {v14 .. v21}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v2

    .line 131
    iget-object v14, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->cu:Llt/noframe/gpsfarmguide/sprayer/CCalcs;

    iget-object v3, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v4

    sub-int/2addr v4, v10

    invoke-interface {v3, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v3

    move-object v15, v3

    check-cast v15, Lcom/google/android/gms/maps/model/LatLng;

    iget-wide v3, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->bearing:D

    iget-wide v5, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->sprayWidth:D

    const-wide v20, -0x3fa9800000000000L    # -90.0

    move-wide/from16 v16, v3

    move-wide/from16 v18, v5

    invoke-virtual/range {v14 .. v21}, Llt/noframe/gpsfarmguide/sprayer/CCalcs;->linePointByBearingAndDistance(Lcom/google/android/gms/maps/model/LatLng;DDD)Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v3

    .line 132
    invoke-direct {v1, v3, v2}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->getPointOfIntersectionToLastBearing(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)I

    move-result v12

    .line 136
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->pt1:Lcom/google/android/gms/maps/model/LatLng;

    iget-object v3, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-direct {v1, v2, v0, v3, v10}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->findIntersectionIndx(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Ljava/util/List;I)Z

    move-result v2

    if-nez v2, :cond_4

    .line 137
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    new-instance v3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->pt1:Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v3, v4, v0}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 141
    :cond_4
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->pt2:Lcom/google/android/gms/maps/model/LatLng;

    iget-object v3, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-direct {v1, v2, v0, v3, v10}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->findIntersectionIndx(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Ljava/util/List;I)Z

    move-result v2

    if-nez v2, :cond_5

    .line 142
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    new-instance v3, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    iget-object v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->pt2:Lcom/google/android/gms/maps/model/LatLng;

    invoke-direct {v3, v4, v0}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;-><init>(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    invoke-interface {v2, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 145
    :cond_5
    :goto_1
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->mids:Ljava/util/List;

    invoke-interface {v2, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 147
    invoke-direct/range {p0 .. p0}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->recalculateFinnal()V

    .line 150
    invoke-direct/range {p0 .. p0}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->isFinalSelfIntersectsOrhaveTooMuchPoints()Z

    move-result v0

    if-eqz v0, :cond_e

    const/4 v2, 0x0

    if-ne v12, v10, :cond_6

    .line 156
    :try_start_0
    iget-object v0, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    iget-object v3, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v3}, Ljava/util/List;->size()I

    move-result v3

    add-int/lit8 v3, v3, -0x3

    invoke-interface {v0, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;
    :try_end_0
    .catch Ljava/lang/IndexOutOfBoundsException; {:try_start_0 .. :try_end_0} :catch_0

    move-object v3, v0

    goto :goto_2

    :catch_0
    move-exception v0

    move-object v3, v2

    goto :goto_3

    :cond_6
    move-object v3, v2

    :goto_2
    if-ne v12, v11, :cond_7

    .line 159
    :try_start_1
    iget-object v0, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    iget-object v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v4

    add-int/lit8 v4, v4, -0x3

    invoke-interface {v0, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;
    :try_end_1
    .catch Ljava/lang/IndexOutOfBoundsException; {:try_start_1 .. :try_end_1} :catch_1

    goto :goto_4

    :catch_1
    move-exception v0

    .line 163
    :goto_3
    invoke-virtual {v0}, Ljava/lang/IndexOutOfBoundsException;->printStackTrace()V

    :cond_7
    move-object v0, v2

    .line 166
    :goto_4
    iget-object v4, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v4}, Ljava/util/List;->size()I

    move-result v5

    sub-int/2addr v5, v11

    invoke-interface {v4, v5}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    .line 167
    iget-object v5, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v6

    sub-int/2addr v6, v11

    invoke-interface {v5, v6}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    .line 169
    iget-object v6, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v6}, Ljava/util/List;->size()I

    move-result v7

    sub-int/2addr v7, v10

    invoke-interface {v6, v7}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    .line 170
    iget-object v7, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v7}, Ljava/util/List;->size()I

    move-result v8

    sub-int/2addr v8, v10

    invoke-interface {v7, v8}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v7

    check-cast v7, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;

    .line 172
    new-instance v8, Ljava/util/ArrayList;

    invoke-direct {v8}, Ljava/util/ArrayList;-><init>()V

    iput-object v8, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    .line 173
    new-instance v8, Ljava/util/ArrayList;

    invoke-direct {v8}, Ljava/util/ArrayList;-><init>()V

    iput-object v8, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    if-eqz v3, :cond_8

    .line 175
    invoke-virtual {v3}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v8

    goto :goto_5

    :cond_8
    invoke-virtual {v4}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v8

    :goto_5
    if-eqz v0, :cond_9

    invoke-virtual {v0}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v9

    goto :goto_6

    :cond_9
    invoke-virtual {v5}, Llt/noframe/gpsfarmguide/sprayer/spray/ObjStripe;->getSide()Lcom/google/android/gms/maps/model/LatLng;

    move-result-object v9

    :goto_6
    invoke-direct {v1, v8, v9, v2, v2}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->setSprayPolygonOptions(Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;Lcom/google/android/gms/maps/model/LatLng;)V

    .line 177
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    if-eqz v3, :cond_a

    move-object v8, v3

    goto :goto_7

    :cond_a
    move-object v8, v4

    :goto_7
    invoke-interface {v2, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 178
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    if-eqz v0, :cond_b

    move-object v8, v0

    goto :goto_8

    :cond_b
    move-object v8, v5

    :goto_8
    invoke-interface {v2, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    if-eqz v3, :cond_c

    .line 180
    iget-object v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v2, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_c
    if-eqz v0, :cond_d

    .line 181
    iget-object v0, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v0, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 183
    :cond_d
    iget-object v0, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->rights:Ljava/util/List;

    invoke-interface {v0, v6}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 184
    iget-object v0, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lefts:Ljava/util/List;

    invoke-interface {v0, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 186
    invoke-direct/range {p0 .. p0}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->recalculateFinnal()V

    .line 189
    :cond_e
    iget-boolean v0, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->drawPolygon:Z

    if-eqz v0, :cond_f

    invoke-direct/range {p0 .. p0}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->redrawPolygon()V

    :cond_f
    if-nez v13, :cond_10

    .line 190
    iget-wide v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->bearing:D

    iput-wide v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->lastbearing:D

    .line 191
    :cond_10
    invoke-direct/range {p0 .. p0}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->calculateCurrentPolygonArea()D

    move-result-wide v2

    iput-wide v2, v1, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->currentArea:D

    return-void

    .line 98
    :cond_11
    :goto_9
    invoke-direct/range {p0 .. p1}, Llt/noframe/gpsfarmguide/sprayer/spray/Sprayer;->ifStart(Lcom/google/android/gms/maps/model/LatLng;)V

    return-void
.end method
